Skip to content
← Back to Community
create a string Q1 and slice Q1
Profile icon
SeanFoltz

how do i create a string called Q1 with characters Welcome to MU! then slice Q1 to obtain only MU! and assign it Q2

Voters
Profile icon
SeanFoltz
Comments
hotnewtop
Profile icon
codebroken

Here is a quick guide, you can have a look to find out what Python calls string slicing.

Profile icon
SixBeeps

You're looking for what Python calls string slicing. Here's a quick guide to those.

In general, Q2 is called a substring.