gpt-3.5-turbo-0613· OpenAI
WildChat-4.8M (AI2)
a= "harry !!! " print(len(a)) print(a.upper()) print(a.lower()) print(a.rstrip ("!"))…
- User
a= "harry !!! " print(len(a)) print(a.upper()) print(a.lower()) print(a.rstrip ("!")) where is mistake
- Assistant
The mistake is in the syntax of the "rstrip" method. It should be written as:
a.rstrip("!")
(without a space between "rstrip" and the opening parenthesis).