w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Extract substrings from string in python
text = "AED|784|2|United Arab Emirates dirham|United Arab
Emirates"

spl = text.split("|")

var1, var2, var3, var4, var5 = spl
print(var1)
print (spl)
AED
['AED', '784', '2', 'United Arab Emirates dirham', 'United Arab Emirates']




© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.