Changeset 3fcc98e in git for Singular/dyn_modules/python/cart.py
- Timestamp:
- Jan 31, 2020, 10:23:58 AM (4 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- ef6df21e3783870d5dd988a568b01c19e2ccbbb5
- Parents:
- a17747d8c42415aaf1eace9c5b94db3a73b73dd1
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/dyn_modules/python/cart.py
ra17747 r3fcc98e 20 20 def cartn(sequence, n): 21 21 tocombine=list(itertools.repeat(sequence,n)) 22 return itertools.imap(tuple,xcombine(*tocombine))22 return list(map(tuple,xcombine(*tocombine))) 23 23 24 24 if __name__=='__main__': 25 25 for i in cartn([1,2,3],4): 26 print i26 print(i)
Note: See TracChangeset
for help on using the changeset viewer.