KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Suppose I have some code like: if A[i] > B[j]: x = A[i] i += 1 else: x = B[j] j += 1 Is there a simpler way to write it? Does Python offer syntax similar to this? x = (A[i] > B[j]) ? A[i] : B[j] ((A[i] > B[j]) ? i : j) += 1
Tags (comma-separated)
Save Edits
Cancel