str = "This article is written in {}" print (str.format("Python")) 1

str = “This article is written in {}” print (str.format(“Python”))

ma_liste = (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
def ma_fonction(x):
  for x in range(len(ma_liste)):
    if x % 2 == 0:
      print(x)
ma_fonction(1)

Here is what the above code is Doing:
1. We define a function called ma_fonction that takes in a parameter x.
2. We define a for loop that iterates through the length of the list ma_liste.
3. We define a conditional statement that checks if the value of x is even.
4. If the value of x is even, we print the value of x.

Similar Posts