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
8 questions
PRG1 - Day 4 starter

Quiz
•
University
8 questions
GDSC Python Bootcamp

Quiz
•
University
11 questions
Python If statement

Quiz
•
University
10 questions
Ввод вывод данных

Quiz
•
6th Grade - University
10 questions
Strings y listas en Python

Quiz
•
University
10 questions
Python Basics: Dictionaries and Strings

Quiz
•
University - Professi...
10 questions
Intro to Python

Quiz
•
KG - University
11 questions
Python Projects Quiz

Quiz
•
6th Grade - University
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
21 questions
Spanish-Speaking Countries

Quiz
•
6th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
7 questions
Common and Proper Nouns

Interactive video
•
4th Grade - University
12 questions
Los numeros en español.

Lesson
•
6th Grade - University
7 questions
PC: Unit 1 Quiz Review

Quiz
•
11th Grade - University
7 questions
Supporting the Main Idea –Informational

Interactive video
•
4th Grade - University
12 questions
Hurricane or Tornado

Quiz
•
3rd Grade - University
7 questions
Enzymes (Updated)

Interactive video
•
11th Grade - University