I'm reading in a file and storing the info in a dict as it reads from top to bottom. I don't want to print out in a wrong order compared to the original file.
Also, a very small question: I remember seeing it somewhere a short form of the if and else statement:
if a == 'a':
a = 'b' ? a = 'c'
Do you know the exact form?
Thanks.
a = 'b' if a == 'a' else 'c'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With