split a string by comma in python

str = 'apple,orange,grape'

#split string by ,
chunks = str.split(',')

print(chunks)

Are there any code examples left?
Create a Free Account
Unlock the power of data and AI by diving into Python, ChatGPT, SQL, Power BI, and beyond.
Sign up
Develop soft skills on BrainApps
Complete the IQ Test
Relative searches
separate values by comma in python where $$ is present how to split text by comma in python split string by comma in python split text by comma python python separate string with comma python split string by comma into list python3 split string by comma split string python i comma split by dot or comma python separate string by commas python split by comma in python split comma separated string into array python split string with comma python how to split a string by commas python# how to split in array from comma in python Python split a number commas split sting by comma python how to split with comma seperated text in python python split comma separated array of string python split comma separated string split string at comma to form array python hoe to split the numbers using comma in python python split comma comma separated split string python explode by comma python split comma separated string in python to array array split eith comma in python python split by comma how to split string with comma in python python split string at comma splitting string into list based on comma how to split by comma in python python string split by comma python split comma separated string to list split comma python split string into list by comma python python split text comma how to split a comma separated string in python split a string separated by comma in python split by comma python separate every string with comma python how to split a string based on comma in python python3 how to split a string from comma python separate string by comma letter separate from word using comma in python split string by comma python python split string by comma python split file line using comma python split string on comma and iterate python convert string to list split but keep commas split strings by comma python
Made with love
This website uses cookies to make IQCode work for you. By using this site, you agree to our cookie policy

Welcome Back!

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign in
Recover lost password
Or log in with

Create a Free Account

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign up
Or sign up with
By signing up, you agree to the Terms and Conditions and Privacy Policy. You also agree to receive product-related marketing emails from IQCode, which you can unsubscribe from at any time.
Creating a new code example
Code snippet title
Source