GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Beginner-Python-exercises/Exercise-06-String-Lists.py at master · ihossai4/Beginner-Python-exercises Expand file tree/ Copy pathExercise-06-String-Lists.pyMore file actions 11 lines (9 loc) · 351 Bytes / Copy pathExercise-06-String-Lists.pyFile metadata and controls11 lines (9 loc) · 351 Bytes 1 2 3 4 5 6 7 8 9 10 11 ''' Exercise 6: String Lists Ask the user for a string and print out whether this string is a palindrome or not. (A palindrome is a string that reads the same forwards and backwards.) ''' # Solution input_string = input("Pleas input a string:") print("String is a palindrome" if input_string[::-1] == input_string else "String is not a palindrome") |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |