2👍
✅
Without access to a machine with python I cant test but you should be able to do:
c = tuple(("%g" % x , "%+g" % x) for x in i0)
http://docs.python.org/release/3.0/library/stdtypes.html#old-string-formatting-operations
Should also work in earlier python versions
EDIT:- to remove the +
from a Zero value:
c = tuple(("%g" % x , "%+g" % x) for x in i0 if x != 0 else ("0", "0"))
0👍
define this field as characters, but do validation in Integer. this should be the fast solution
- [Answered ]-Django: Session Cache not updated when using Cookie Based Session Storage
- [Answered ]-How can I integrate Bootstrap with Python programming language and the Django framework?
- [Answered ]-Django (1.6.3) Model.save() method not working
- [Answered ]-Django change site language
Source:stackexchange.com