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
In questa pagina del sito puoi guardare il video online Case-insensitive String Comparison in Python della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Programmer Banda 25 maggio 2021, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 1,879 volte e gli è piaciuto 42 spettatori. Buona visione!