HelpContactFor teachers and institutes
>_StemPy Lab
Mock TestsClasses

>_StemPy Lab

Learn. Solve. Code the solutions. Test yourself.

Live examsFree mock exams, timed and rankedEveryone starts together, and your score and rank come the moment it ends.See the exams →

Learn

  • Physics
  • Chemistry
  • Mathematics
  • Biology
  • Python Programming
  • Statistics & Data Science
  • Classes
  • Groups

Practice

  • Problems
  • Quizzes
  • Mock Tests
  • Prepare for an Exam
  • Question Sets
  • Exams
  • Certificates
  • Python Labs
  • AI Practice Generator
  • Student-Created Tests

Community

  • Discussions
  • Resources
  • Notes
  • Glossary
  • Blog

Account

  • Log in
© 2026 senLearn. All rights reserved.HelpAboutContactPrivacy PolicyTerms of UseRefund Policy
  1. Glossary
  2. /Python and data
  3. /Split and Join (Python strings)

What are Split and Join (Python strings)?

In short

split breaks a string into a list of smaller strings at a separator, and join puts a list of strings together into one string with a separator between them.

In simple words

"a,b,c".split(",") gives ['a', 'b', 'c']. With no argument, split() breaks at any run of spaces. "-".join(["a", "b", "c"]) gives 'a-b-c'. The separator is written first in join, then the list. Both are used for cleaning data, such as turning a line of a file into numbers.

Example

This prints 36.

Also searched as: split join.

Learn it properly

  • Lessons on this topic
  • Test yourself

Related terms

  • List (in Python)
  • Variable (in Python)

← All glossary terms

Learn it in

  1. Words and Text: Strings
All lessons on this topic →

Practise

  1. For the text "the cat sat on the mat", write the program lines that show: how many times…Medium
  2. A student wants to change the name "Rahul" to "Raju" and writes…Medium
  3. The variable word = "elephant" has eight letters…Easy
  4. The name is "asha rao". Show its initials in capital letters: AR.Hard

Quick questions

  1. A student tries five one-line programs that index or slice a string, a list or a…Advanced
  2. A program takes slices of a string, changes the case of letters, and searches for a…Hard
  3. A string contains a tab escape and a backslash escape. What does the program print?Hard

More Python and data terms

  1. String (in Python)
  2. Cell (in a Python notebook)
  3. Class and Special Methods (in Python)
  4. Dictionary (in Python)
  5. For Loop
  6. Function (in Python)
All Python and data terms →

Try it yourself

Python labs run in your browser. Type the code, run it and see what happens.

Open a Python lab