Menu
Coddy logo textTech

Last 2

Lesson 16 of 19 in Coddy's Into the Past || Complete Beginner for Python Strings course.

Now you are going to start putting all the pieces together.

challenge icon

Challenge

Easy

Create  a function which returns the last 2 characters of the argument s


Example:

Input - "happy"

Expected Output - "py"

Try it yourself

def last(s):
    #write your code below

All lessons in Into the Past || Complete Beginner for Python Strings