Saturday, 11 February 2023

python quick guide - python tutorial - python cheat sheet


Basic syntax

  • Variables: x = 5, y = "hello"
  • Comments: # This is a comment
  • Printing output: print("hello world")
  • User input: name = input("What is your name? ")
  • If statement:

 if x > 10:

    print("x is greater than 10")

elif x == 10:

    print("x is equal to 10")

else:

    print("x is less than 10")

Read more »

Labels:

Tuesday, 7 February 2023

Regular expression to match a line that doesn't contain a word

 


Read more »

Labels: , ,