Case-insensitive String Comparison in Python

Published: 25 May 2021
on channel: 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​


On this page of the site you can watch the video online Case-insensitive String Comparison in Python with a duration of hours minute second in good quality, which was uploaded by the user Programmer Banda 25 May 2021, share the link with friends and acquaintances, this video has already been watched 1,879 times on youtube and it was liked by 42 viewers. Enjoy your viewing!