Spl in Python!

Multiple assignments in a line!
eg., a, b = 0, 1

conditions:

  • All non-zeros are true, zeros are false
  • if it is sequence, non-zero is true, empty seq is false
    • eg., myList =[1,3,5] #true
    • myEmptyList=[] # false


Comments

Popular posts from this blog

Day 2: Python Installation and IDE