{"id":24666,"date":"2021-10-25T09:06:41","date_gmt":"2021-10-25T03:36:41","guid":{"rendered":"https:\/\/python-programs.com\/?p=24666"},"modified":"2021-11-05T19:15:36","modified_gmt":"2021-11-05T13:45:36","slug":"python-string-islower-method-with-examples","status":"publish","type":"post","link":"https:\/\/python-programs.com\/python-string-islower-method-with-examples\/","title":{"rendered":"Python String islower() Method with Examples"},"content":{"rendered":"
In the previous article, we have discussed Python String zfill() Method with Examples<\/a> If all of the characters are in lower case, the islower() method returns True; otherwise, it returns False.<\/p>\n Only alphabet characters are checked, not numbers, symbols, or spaces.<\/p>\n Syntax:<\/strong><\/p>\n Parameters: <\/strong>This function has no parameters.<\/p>\n Return Value:<\/strong><\/p>\n The islower() method gives:<\/p>\n Examples:<\/strong><\/p>\n Example1:<\/strong><\/p>\n Input:<\/strong><\/p>\n Output:<\/strong><\/p>\n Example2:<\/strong><\/p>\n Input:<\/strong><\/p>\n Output:<\/strong><\/p>\n Approach:<\/strong><\/p>\n Below is the implementation:<\/strong><\/p>\n Output:<\/strong><\/p>\n Approach:<\/strong><\/p>\n Below is the implementation:<\/strong><\/p>\n Output:<\/strong><\/p>\n Go through our tutorial and learn about various Python String Method Examples<\/a> and learn how to apply the knowledge while dealing with strings.<\/p>\n In the previous article, we have discussed Python String zfill() Method with Examples islower() Method in Python: If all of the characters are in lower case, the islower() method returns True; otherwise, it returns False. Only alphabet characters are checked, not numbers, symbols, or spaces. Syntax: string.islower() Parameters: This function has no parameters. Return Value: …<\/p>\n
\nislower() Method in Python:<\/strong><\/p>\nstring.islower()<\/pre>\n
\n
Given string = 'welcome to python-programs'\r\nGiven string = '1234 Hello ALL @'\r\nGiven string = 'good morning btechgeeks 12345 @#!'<\/pre>\n
The given string = welcome to python-programs\r\nChecking if the given string has all lowercase characters or not = True\r\nThe given string = 1234 Hello ALL @\r\nChecking if the given string has all lowercase characters or not = False\r\nThe given string = good morning btechgeeks 12345 @#!\r\nChecking if the given string has all lowercase characters or not = True<\/pre>\n
Given string = 'hello this is btech_geeks'\r\nGiven string = 'ThIs IS a PYThon learning PLATform'\r\nGiven string = '#### hello everyone ##%%$12346'<\/pre>\n
The given string = hello this is btech_geeks\r\nChecking if the given string has all lowercase characters or not = True\r\nThe given string = ThIs IS a PYThon learning PLATform\r\nChecking if the given string has all lowercase characters or not = False\r\nThe given string = #### hello everyone ##%%$12346\r\nChecking if the given string has all lowercase characters or not = True<\/pre>\n
String islower() Method Examples in Python<\/h2>\n
\n
Method #1: Using Built-in Functions (Static Input)<\/h3>\n
\n
# Give the string as static input and store it in a variable.\r\ngvn_strng1 = 'welcome to python-programs'\r\n# Apply islower() function to the given string in which if all of the characters\r\n# are in lower case, the islower() method returns True; otherwise, it returns False.\r\n# Store it in another variable.\r\nrslt_1 = gvn_strng1.islower()\r\n# Print the above-given String.\r\nprint(\"The given string = \", gvn_strng1)\r\n# Print the result after checking if the given string has all lowercase\r\n# characters or not.\r\nprint(\"Checking if the given string has all lowercase characters or not = \", rslt_1)\r\n# Similarly, do the same for other strings and print the result.\r\ngvn_strng2 = '1234 Hello ALL @'\r\nrslt_2 = gvn_strng2.islower()\r\nprint(\"The given string = \", gvn_strng2)\r\nprint(\"Checking if the given string has all lowercase characters or not = \", rslt_2)\r\n\r\ngvn_strng3 = 'good morning btechgeeks 12345 @#!'\r\nrslt_3 = gvn_strng3.islower()\r\nprint(\"The given string = \", gvn_strng3)\r\nprint(\"Checking if the given string has all lowercase characters or not = \", rslt_3)\r\n<\/pre>\n
The given string = welcome to python-programs\r\nChecking if the given string has all lowercase characters or not = True\r\nThe given string = 1234 Hello ALL @\r\nChecking if the given string has all lowercase characters or not = False\r\nThe given string = good morning btechgeeks 12345 @#!\r\nChecking if the given string has all lowercase characters or not = True<\/pre>\n
Method #2: Using Built-in Functions (User Input)<\/h3>\n
\n
# Give the string as user input using the input() function and store it in a variable.\r\ngvn_strng1 = input(\"Enter some Random String = \")\r\n# Apply islower() function to the given string in which if all of the characters\r\n# are in lower case, the islower() method returns True; otherwise, it returns False.\r\n# Store it in another variable.\r\nrslt_1 = gvn_strng1.islower()\r\n# Print the above-given String.\r\nprint(\"The given string = \", gvn_strng1)\r\n# Print the result after checking if the given string has all lowercase\r\n# characters or not.\r\nprint(\"Checking if the given string has all lowercase characters or not = \", rslt_1)\r\n# Similarly, do the same for other strings and print the result.\r\ngvn_strng2 = input(\"Enter some Random String = \")\r\nrslt_2 = gvn_strng2.islower()\r\nprint(\"The given string = \", gvn_strng2)\r\nprint(\"Checking if the given string has all lowercase characters or not = \", rslt_2)\r\n\r\ngvn_strng3 = input(\"Enter some Random String = \")\r\nrslt_3 = gvn_strng3.islower()\r\nprint(\"The given string = \", gvn_strng3)\r\nprint(\"Checking if the given string has all lowercase characters or not = \", rslt_3)\r\n<\/pre>\n
Enter some Random String = hello btechgeeks\r\nThe given string = hello btechgeeks\r\nChecking if the given string has all lowercase characters or not = True\r\nEnter some Random String = ThIS IS a pytHON learning PLATform\r\nThe given string = ThIS IS a pytHON learning PLATform\r\nChecking if the given string has all lowercase characters or not = False\r\nEnter some Random String = ###% hello everyone #$*\r\nThe given string = ###% hello everyone #$*\r\nChecking if the given string has all lowercase characters or not = True<\/pre>\n
\n