python separated string to list code example Example: convert separated string to list List<String> items = Arrays.asList(str.split("\\s*,\\s*"));