Tag Archives: Helpful

Another 5 Helpful Python String Methods – Python Dev Feed

Another 5 Helpful Python String Methods Hello, I’m Aya Bouchiha, this is the part 2 of 5 useful python string methods. capitalize() capitalize(): this string method converts to uppercase the first letter of the first word in the specified string. first_name = “aya” print(first_name.capitalize()) # Aya Enter fullscreen mode Exit fullscreen mode isalpha() isalpha(): checks…

Read More

5 Of The Most Helpful Python List Methods – Python Dev Feed

5 Of The Most Helpful Python List Methods Hello everybody, Today we’ll discuss 5 helpful Python list methods. clear() clear(): This method helps you to delete all list elements. cities = [‘azemmour’, ‘tanger’, ‘casablanca’] print(len(cities)) # 3 cities.clear() print(cities) # [] print(len(cities)) # 0 Enter fullscreen mode Exit fullscreen mode reverse() reverse(): reverse the order…

Read More