Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- name = "fabio"
- if name == "fabio":
- print("yes")
- else:
- print("no")
- inputVar = input()
- #empty string is evaluated as false
- if not inputVar:
- print('empty string')
- if bool(inputVar) == False:
- print('empty string')
- spam = 0
- while spam < 5:
- print('Hello world')
- spam += 1
- #conversion function
- myNum = int(input())
- print('number in input was: ' + str(myNum))
- #goes till 4
- for i in range(5):
- print('hello' + str(i))
- for i in range(1, 5):
- print('hello' + str(i))
- #step of 2
- for i in range(1, 5, 2):
- print('hello' + str(i))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement