Splitting, Concatenating, and Joining Strings in Python

Splitting, Concatenating, and Joining Strings in Python

University

6 Qs

quiz-placeholder

Similar activities

Cha-ching 2

Cha-ching 2

1st Grade - University

8 Qs

Teste python- Unesp-Jaboticabal

Teste python- Unesp-Jaboticabal

University

10 Qs

Chapter 5-1: Review Questions & Exercises

Chapter 5-1: Review Questions & Exercises

University

10 Qs

Data Validation

Data Validation

KG - Professional Development

11 Qs

Jarkom F

Jarkom F

University

10 Qs

PW1-BOOTSTRAP

PW1-BOOTSTRAP

University

10 Qs

Programación Web II

Programación Web II

University

10 Qs

TES AWAL MODUL 2

TES AWAL MODUL 2

University

10 Qs

Splitting, Concatenating, and Joining Strings in Python

Splitting, Concatenating, and Joining Strings in Python

Assessment

Quiz

Computers

University

Practice Problem

Hard

Created by

Sangameshwar Biradar

Used 20+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

6 questions

Show all answers

1.

MULTIPLE SELECT QUESTION

20 sec • 1 pt

In Python, strings are…

char arrays

changeable

immutable

str objects

2.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

The minsplit parameter to split() specifies the minimum number of splits to make to the input string.

False

True

3.

MULTIPLE SELECT QUESTION

20 sec • 1 pt

Which of the following would separate a string input_string on the first 2 occurences of the letter “e”?

'e'.split(input_string, maxsplit=2)

input_string.split('e', 2)

input_string.split('e', maxsplit=2)

'e'.split(input_string, 2)

4.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Python strings have a property called “immutability.” What does this mean?

Strings can’t be divided by numbers

You can update a string in Python with concatenation

Strings in Python can be represented as arrays of char S

Strings in Python can’t be changed

5.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

If you want to transform a list of strings input_list into a single string with a comma between each item, which of the following would you give as the input to join()?

string

' , '

str

input_list

6.

MULTIPLE SELECT QUESTION

20 sec • 1 pt

Which of the following mathematical operators can be used to concatenate strings:

*

/

-

+

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?