Exercise 1: Concatenate Substrings

Concatenate strings together.

Problem statement

In the widget below, you’re given a String variable called input_string. Concatenate three occurrences of <3 at the end of this input string. Don’t forget to store the resulting string in result!

Note: Write your code starting at line 4.

Example

input_string = "ruby"
result = "ruby<3<3<3"

Try it yourself

Create a free account to access the full course.

By signing up, you agree to Educative's Terms of Service and Privacy Policy