निम्न कोड पायथन में केस-इनसेंसिटिव स्ट्रिंग तुलना का एक उदाहरण है।
उदाहरण
string1 = 'Star Wars'\nstring2 = 'star wars'\nif string1.lower() == string2.lower():\n print("The strings are case insensitive")\nelse:\n print("The strings are not case insensitive")आउटपुट
यह कोड निम्न आउटपुट देता है:
The strings are case insensitive