names = []
locations = []
a = ["Vraj Shroff\nIndia", "Vraj\nIndia", "Shroff\nxyz", "abd cvd\nUS"]
for i in a:
b = i.splitlines()
names.append(b[0])
locations.append(b[1])
print(names)
print(locations)
выход:
['Vraj Shroff', 'Vraj', 'Shroff', 'abd cvd']
['India', 'India', 'xyz', 'US']
Это то, что вы искали?