fork download
  1. yoba = [(None, None), (None, 'Smack my Bitch Up'), ('The Prodigy', None), ('The Prodigy', 'Smack my Bitch Up')]
  2.  
  3. def dologic(A, B):
  4.  
  5. if None in (A, B):
  6.  
  7. return A or B or "..."
  8.  
  9. else:
  10.  
  11. return str.format("{} - {}", A, B)
  12.  
  13. for A, B in yoba:
  14. print(dologic(A, B))
Success #stdin #stdout 0.02s 9984KB
stdin
Standard input is empty
stdout
...
Smack my Bitch Up
The Prodigy
The Prodigy - Smack my Bitch Up