From f5c85183d9c874fca806917e50992daea4101496 Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Wed, 14 Nov 2018 20:23:06 -0500 Subject: basic lettering (#344) Can handle multiple lines of text and routes the stitching in alternating directions on each line. --- lib/utils/string.py | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 lib/utils/string.py (limited to 'lib/utils/string.py') diff --git a/lib/utils/string.py b/lib/utils/string.py new file mode 100644 index 00000000..a7839f7d --- /dev/null +++ b/lib/utils/string.py @@ -0,0 +1,5 @@ +def string_to_floats(string, delimiter=","): + """Convert a string of delimiter-separated floats into a list of floats.""" + + floats = string.split(delimiter) + return [float(num) for num in floats] -- cgit v1.2.3