1june

  • 홈

Python 11

Python Crash Course: 챕터 5

Conditional Test>>> cars = 'bmw'Can be interpreted as: 'Set the value of the cars 'bmw' ' >>> cars == 'bmw'True>>> cars == 'audi'FalseCan be interpreted as: 'Is the value of the cars 'bmw'?' True. 'Is the value of the cars 'audi'?' False. Case sensitivity is important. For exmaple:>>> car = 'Audi'>>> car == 'audi'FalseHowever,>>> car = 'Audi'>>> car.lower() == 'audi'True  Checking for inequality..

Python/Python Crash Course 2024.06.27

Python Crash Course: 챕터 4

Using a Loop  Starts with for and indentation is followed with a tab for PEP 8. Don't forget the colon.magicians = ['alice', 'david', 'carolina']for magician in magicians: print(f'They are all unqualified {magician}')They are all unqualified aliceThey are all unqualified davidThey are all unqualified carolina Making numerical listsrange() function generates a series of numbersfor value in range(..

Python/Python Crash Course 2024.06.26
이전
1 2 3 4 5 6
다음
더보기
프로필사진

1june

summarised what I have learned 배운 내용 정리

  • 전체 글 (11)
    • Python (11)
      • Python Crash Course (11)
      • Side Projects (0)

티스토리툴바