Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
split the list
#2
remove the slice:
post_fix = ['D/Raj_Data/PythonCodes','/C/Viru_Data/PythonCodes']
for i in range(len(post_fix)):
    tmp = str((post_fix[i]))
    #print(tmp)
    print((str(post_fix[i].split('/'))))
Reply


Messages In This Thread
split the list - by SriRajesh - Jan-01-2020, 12:00 PM
RE: split the list - by Larz60+ - Jan-01-2020, 12:25 PM
RE: split the list - by perfringo - Jan-01-2020, 07:07 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [split] why can't i create a list of numbers (ints) with random.randrange() astral_travel 7 2,890 Oct-23-2022, 11:13 PM
Last Post: Pedroski55
  Split string using variable found in a list japo85 2 2,200 Jul-11-2022, 08:52 AM
Last Post: japo85
  [split] question about list comprehension Armin 17 8,436 Jan-29-2020, 04:32 PM
Last Post: Clunk_Head
  List help to split into single entries paul41 3 2,998 Nov-25-2019, 08:09 AM
Last Post: perfringo
  Split the list and obtain a single value Gururaj 1 2,815 Jul-12-2019, 12:01 AM
Last Post: scidam
  [split] Automate the boring stuff, inserting commas in list srikanth 1 2,681 Jul-02-2019, 02:29 PM
Last Post: metulburr
  Split List and Sublist from Pyodbc parthi1705 1 2,854 May-05-2019, 10:44 AM
Last Post: Larz60+
  split a item from a list frequency 2 3,314 Nov-03-2018, 12:57 PM
Last Post: frequency

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020