We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
TIP101 Unit 3 Session 1 (Click for link to problem statements)
Understand what the interviewer is asking for by using test cases and questions about the problem.
Plan the solution with appropriate visualizations and pseudocode.
General Idea: Slice the entire string in reverse order.
1) Return a slicing of the entire input string, but with a negated step parameter
def reverse_string(my_str): return my_str[::-1] # OR def reverse_string(my_str): reversed_str = '' for char in my_str: reversed_str = char + reversed_str return reversed_str