Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public String niceList(PythonListWhichIsNotAvailableInJava_Lol list) {
- String full = "[";
- for (String item: list) { // iterate over all items in the list
- full += item + ", ";
- }
- return full + "]";
- }
- def niceList(list_): # doesn override the built-in `list`
- full = ""
- for item in list_:
- full += str(item) + ", "
- return full + "]"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement