Hi all,
I am having a bit of difficulty in figuring out an efficient way to
split up my data and identify the unique pieces of it.
list=['1p2m_3.3-1.8v_sal_ms','1p2m_3.3-1.8_sal_log']
Now I want to split each item up on the _ and compare it with all
others on the list, if there is a difference
rh0dium wrote:
Hi all,
I am having a bit of difficulty in figuring out an efficient way to
split up my data and identify the unique pieces of it.
list=['1p2m_3.3-1.8v_sal_ms','1p2m_3.3-1.8_sal_log']
Now I want to split each item up on the _ and compare it with all
others on the list,
rh0dium [EMAIL PROTECTED] writes:
Hi all,
I am having a bit of difficulty in figuring out an efficient way to
split up my data and identify the unique pieces of it.
list=['1p2m_3.3-1.8v_sal_ms','1p2m_3.3-1.8_sal_log']
Now I want to split each item up on the _ and compare it with all
You can come quite close to what you want without splitting the string
at all. It sounds like you are asking the user to build up a string,
and you want to keep checking through your list to find any items that
begin with the string built up by the user. Try something like this:
mylist =
Alexander Schmolck [EMAIL PROTECTED] writes:
The easiest way to do this is to have a nested dictionary of prefixes: for
each prefix as key add a nested dictionary of the rest of the split as value
or an empty dict if the split is empty. Accessing the dict with an userinput
will give you all
rh0dium [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Hi all,
I am having a bit of difficulty in figuring out an efficient way to
split up my data and identify the unique pieces of it.
list=['1p2m_3.3-1.8v_sal_ms','1p2m_3.3-1.8_sal_log']
Now I want to split each item up on the
Claudio Grondi a écrit :
(snip)
code
list=['1p2m_3.3-1.8v_sal_ms','1p2m_3.3-1.8v_pol_ms','1p3m_3.3-18.v_sal_ms']
Avoid using 'list' as an identifier.
(snip)
--
http://mail.python.org/mailman/listinfo/python-list