This website requires JavaScript.
Explore
Help
Register
Sign In
exercism
/
python
Watch
1
Star
0
Fork
0
You've already forked python
Code
Issues
Pull Requests
Actions
1
Packages
Projects
Releases
Wiki
Activity
Files
c5d9d9c0b3c808c1cb6f1968e7f9a096ec64dfb4
python
/
exercises
/
practice
/
reverse-string
/
example.py
3 lines
44 B
Python
Raw
Normal View
History
Unescape
Escape
reverse-string: Don't redefine builting function 'input' (#1412) It hurts readability to redefine the meaning of well-known builtins such as 'input', and pylint rightfully warns about this, saying W: 1,12: Redefining built-in 'input' (redefined-builtin) It's a little unfortunate that Python grabs this part of the namespace, but let's fix the issue by using a different word for 'the input text'.
2018-06-28 14:59:14 +02:00
def
reverse
(
text
=
'
'
)
:
return
text
[
:
:
-
1
]
Reference in New Issue
Copy Permalink