Case-insensitive String Comparison in Python

Publié le: 25 mai 2021
sur la chaîne: Programmer Banda
1,879
42

In this video i have shown you how to compare strings with case insensitivity.

Code:

laptops = ['Msi', 'Lenovo', 'Hp', 'Dell']

our_laptop = 'Acer'

for laptop in laptops:
if laptop.lower() == our_laptop.lower():
print(our_laptop, 'Exists')
else:
pass

If you found the video valuable, please leave a like and subscribe ❤️ It helps the channel grow and helps me pumping out more such content.

#shorts
#python3​​​ #programming​​ #pythontips​


Sur cette page du site, vous pouvez voir la vidéo en ligne Case-insensitive String Comparison in Python durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Programmer Banda 25 mai 2021, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 1,879 fois et il a aimé 42 téléspectateurs. Bon visionnage!