Pyhton 3.4 - Continue


Continue keeps the loop going. It allows you loop to do whatever else it wants to do outside of that statement.

https://www.youtube.com/watch?v=68EhtQbgXRc


Lakers_jerseys_taken = [8, 24, 32, 34]

print('These are the jersey\'s still available:')

for number in range(101):
    if number in Lakers_jerseys_taken:
        print('You must be crazy')
        continue    print(number)

Comments

Popular posts from this blog

Python 3.4 - Caesar Cipher

UML - Use Case Diagram