vendredi 2 mai 2014

Python conditional statement with multiple consequences


Vote count:

0




I want to write a file that compares 2 strings and, if they're the same, does a series of operations. I know already how to do it for a single operation:



if string1 == string2 do_one_thing


But what about doing more things? I suppose it goes like this:



if string1 == string2 do(
first_operation
second operation
)


asked 22 secs ago






Aucun commentaire:

Enregistrer un commentaire