Python basics

python
Author
Modified

April 8, 2024

print(1)
1
print("hello")
hello
print(2 + 2)
4
x = 1
y = 10

print(x + y)
11
word1 = "Hello"
word2 = " World!"

print(word1 + word2)
Hello World!
print(True)
True
print(False)
False
print(True and False)
False
Back to top

Reuse

CC-BY-SA 4.0

Citation

BibTeX citation:
@online{fruehwald,
  author = {Fruehwald, Josef},
  title = {Python Basics},
  url = {https://lin511-2024.github.io/notes/programming/01_Python_basics.html},
  langid = {en}
}
For attribution, please cite this work as:
Fruehwald, Josef. n.d. “Python Basics.” https://lin511-2024.github.io/notes/programming/01_Python_basics.html.