A Game of Letters in Python | Assignment Expert

Problem Statement:

In this problem of A Game of Letters in Python, we are given two strings, we need to create and print a new string. How? We need to create a new string from the two strings. To create, we need the last character of the 1st string, then last character of the 2nd string, then the 1st character of the 2nd string, and then the 1st character of the 1st string.

Code for A Game of Letters in Python:

s1 = 'copy'
s2 = 'assignment'

result = s1[-1] + s2[-1] + s2[0] + s1[0]

print(result)

Output:

A Game of Letters in Python

Also Read:

Share:
Avatar of Harry

Author: Harry

Hello friends, thanks for visiting my website. I am a Python programmer. I, with some other members, write blogs on this website based on Python and Programming. We are still in the growing phase that's why the website design is not so good and there are many other things that need to be corrected in this website but I hope all these things will happen someday. But, till then we will not stop ourselves from uploading more amazing articles. If you want to join us or have any queries, you can mail me at admin@copyassignment.com Thank you