On Sunday, May 31, 2015 at 12:53:19 PM UTC-7, Denis McMahon wrote: > On Sun, 31 May 2015 11:36:35 -0700, fl wrote: > > I am new to Python. I would manipulate a string of hex numbers. If the > > first digit is bigger than 7, the first two digits are required to add > > 4. > What happens if the first two digits are ff, does it become 103 or 03. > If you have ffff_ffff_ffff > Do you want to create 103ff_103ff_103ff > or > 03ff_03ff_03ff > or > newnums = [ bing(x) for x in oldnums ] > > It could probably be done as a single list comprehension, but it might > get a bit messy. > > -- > Denis McMahon, denismfmcma...@gmail.com
Thanks for your reply. In fact, these data are from a 256 entries table. There is no extreme big data, such as Fxxxx. -- https://mail.python.org/mailman/listinfo/python-list