Splitting, Concatenating, and Joining Strings in Python

Quiz
•
Computers
•
University
•
Hard
Sangameshwar Biradar
Used 20+ times
FREE Resource
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:
*
/
-
+
Similar Resources on Wayground
10 questions
G12_Week7

Quiz
•
12th Grade - University
10 questions
Datentypen, Variablen & Eingabe in Python

Quiz
•
University
10 questions
Kuiz Dasar Python

Quiz
•
University
10 questions
Executing SQL Commands With Python

Quiz
•
12th Grade - University
10 questions
Python User Input Quiz

Quiz
•
6th Grade - University
10 questions
Intro-Computacao_3.4

Quiz
•
University
10 questions
Variable warm-up activity

Quiz
•
6th Grade - University
10 questions
Theory of Computation Quiz

Quiz
•
University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
36 questions
Unit 5 Key Terms

Quiz
•
11th Grade - University
7 questions
Figurative Language: Idioms, Similes, and Metaphors

Interactive video
•
4th Grade - University
15 questions
Properties of Equality

Quiz
•
8th Grade - University
38 questions
WH - Unit 3 Exam Review*

Quiz
•
10th Grade - University
21 questions
Advise vs. Advice

Quiz
•
6th Grade - University
12 questions
Reading a ruler!

Quiz
•
9th Grade - University