Light Mode
Dark Mode
text.translate() is't working

Hello, I'm new here but I can't understand why string.translate isnt' working.

I have a such error when i'm trying newtext = text.translate(string.maketrans("",""), string.punctuation)

TypeError: translate() takes exactly one argument (2 given) checkio, 6 <module>, 17

it is working in my idle, but not here.

How can i fix that? Thank you!

Created: April 14, 2014, 1:02 p.m.
Updated: Nov. 5, 2015, 7:17 p.m.
0
6
User avatar
basila