1

I've a lists containing .las Files of different length. I couldn't figure out how it is possible to create a variable containing all the list entries separated by a ";" ?

Thanks for your help,

Mauro

1

1 Answer 1

3

Well am not sure if I get you but:

some_list = ['file.las', 'another_file.las', 'something.las']
e = ';'.join(some_list)
Sign up to request clarification or add additional context in comments.

3 Comments

Thanks this helped out. Would you also know how to add a path before every list entry? Something like: Add: path2+"\\" to every list entry resulting in a "new list" on which I can do the ';'.join(some_list). Thanks
';'.join(map(lambda list_entry:path2+'\'+list_entry,list))
As @Frost.baka explained but I'd also add os.path.join(path2, list_entry). That way you don't have to think on which OS you are.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.