Reputation: 11812
I have the following tuple
res = [('fdetail',), ('fdetail1',)]
I want to have it in two variables using Python
var1 = fdetail
var2 = fdetail1
Any help is highly appreciated.
Upvotes: 0
Views: 310
Reputation: 155438
Because you've got a list
of one-tuple
s, you'll need to do a nested unpack:
(var1,), (var2,) = res
Upvotes: 8