Why is python turning \x0a into a \n ?
In [120]: h='\x0a\xa8\x19\x0b'
In [121]: h
Out[121]: '\n\xa8\x19\x0b'
I don't want this to happen, can I prevent it?
--
http://mail.python.org/mailman/listinfo/python-list
On Mar 4, 10:55 am, mk wrote:
> Sneaky Wombat wrote:
> > I was going to write a def to loop through and look for certain pre-
> > compiled regexs, and then put them in a new dictionary and append to a
> > list,
>
> regexes are overkill in this case I think.
>
>
[ {'vlan_or_intf': 'VLAN2021'},
{'vlan_or_intf': 'Interface'},
{'vlan_or_intf': 'Po1'},
{'vlan_or_intf': 'Po306'},
{'vlan_or_intf': 'VLAN2022'},
{'vlan_or_intf': 'Interface'},
{'vlan_or_intf': 'Gi7/33'},
{'vlan_or_intf': 'Po1'},
{'vlan_or_intf': 'Po306'},
{'vlan_or_intf': 'VLAN2051'},
{'v
sh)
On Apr 30, 1:09 pm, Chris Rebert wrote:
> > On Apr 30, 12:45 pm, Sneaky Wombat <> wrote:
> >> I'm really confused by what is happening here. If I use zip(), I
> >> can't update individual dictionary elements like I usually do. It
> >> upda
would happen, i'd appreciate it. My guess
is that it's iterating through the the whole dictionary because of the
value on the right in zip().
On Apr 30, 12:45 pm, Sneaky Wombat <> wrote:
> I'm really confused by what is happening here. If I use zip(), I
> can't
would happen, i'd appreciate it. My guess
is that it's iterating through the the whole dictionary because of the
value on the right in zip().
On Apr 30, 12:45 pm, Sneaky Wombat <> wrote:
> I'm really confused by what is happening here. If I use zip(), I
> can't
I'm really confused by what is happening here. If I use zip(), I
can't update individual dictionary elements like I usually do. It
updates all of the dictionary elements. It's hard to explain, so here
is some output from an interactive session:
In [52]: header=['a','b','c','d']
In [53]: columnM