From e4495ccb9f56f80b03ac1b8646b568bbbff67503 Mon Sep 17 00:00:00 2001 From: Justus Kuhlmann Date: Mon, 31 Mar 2025 14:00:24 +0000 Subject: [PATCH] use join --- corrlib/tools.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/corrlib/tools.py b/corrlib/tools.py index a912731..a150520 100644 --- a/corrlib/tools.py +++ b/corrlib/tools.py @@ -1,11 +1,9 @@ -def str2list(s): - return s.split(",") +def str2list(string): + return string.split(",") -def list2str(l): - s = l[0] - for it in l[1:]: - s += ',' + it +def list2str(mylist): + s = ",".join(mylist) return s \ No newline at end of file