I have a list like this
[
("name",2344,34, "boy"),("another",345,47,"boy", "last")
]
How do u get each value from it like
Output
name
2344
34
...
What i did was
for row in list_tuple:
for row2 in row:
return row
But i get error too many value to unpack
Please help
Sent from my
ine
1563, in make_responserv, status, headers = rv + (None,) * (3 -
len(rv))ValueError: too many values to unpack
> From: d...@hashcollision.org
> Date: Tue, 19 Apr 2016 15:01:41 -0700
> Subject: Re: [Tutor] List of tuples
> To: itette...@hotmail.com
> CC: tutor@python.org
>
> From: isaac tetteh
> Date: April 19, 2016 at 9:05:04 PM CDT
> To: Danny Yoo
> Subject: Re: [Tutor] List of tuples
>
> Thanks things are working good now. The only problem is i want to print the
> for loop output on one line instead of on each line.
> Example [1,2,3,
Im sure its not working because array is not in function. paste the error
message here im sure someone will give u a better answer
Sent from my iPhone
> On Apr 28, 2016, at 4:07 PM, Yeh wrote:
>
> Thank you!
>
>> You probably want to look at the itertools module.
>>
>> There you can find amo
You can use sorted(line) but you result will be in a list if thats okay.
Otherwise you can iterate the list.
Sent from my iPhone
> On Apr 29, 2016, at 3:03 PM, Ken G. wrote:
>
> In entering five random number, how can I best sort
> it into ascending order, such as 0511414453? Using
> Linux 2.
You have two arguments in you function but when you call the function no
argument is set in. Take the arguments out from the function if you want to use
the the values from the user.
Sent from my iPhone
> On May 1, 2016, at 8:41 AM, Olaoluwa Thomas wrote:
>
> Hi Bob,
>
> Thanks for your fee
For some reason i cant find reply all . But try this
for key, value in mydic.items():
If A==value:
Print key
Nb: use iteritems() if using python2
Sent from my iPhone
> On May 2, 2016, at 4:29 PM, Jason N. via Tutor wrote:
>
> Hello,
> Wanted to ask if its possible to have a d
Sorry for the if statement the correct statement should be "if 'apple' ==value:"
Sent from my iPhone
> On May 2, 2016, at 4:58 PM, isaac tetteh wrote:
>
>
> For some reason i cant find reply all . But try this
> for key, value in mydic.items():
> I
If only I understand what you mean. You can just make all the values in the
dictionary lower, upper or capitalized. Then if you want take an input or
whatever you want to do with it just use .lower() or .upper() or .capitalized()
to convert it to what is in the dictionary. Maybe someone has a be
Also use good text editor like sublimeText. It will do the indentation for you.
Begin forwarded message:
> From: Alan Gauld via Tutor
> Date: August 12, 2016 at 11:37:11 AM CDT
> To: tutor@python.org
> Subject: Re: [Tutor] Fwd: Re: need help
> Reply-To: Alan Gauld
>
>
>> -- Forwarded
"Project that will run on both windows and android/iso" if mean its
responsiveness then flask cannot do that but css3, javascript(Angular),
twitter-bootstrap can help you do that. But if you mean like a desktop/ phone
app then maybe check another framework.
Check out
Flask Web Development: Devel
def foo(x):
a,b = (0,"")
for i in x:
if i != " ":
b+=i
else:
print ("this is b",b)
a = a + int(b)
print ("this is a",a)
b = ""
print ("final a ",a)
this should help you solve it. figure a way to add the last number. if any
troubles ask again.
Thanks [😊]
From: Tu
this is the real code
with
urllib.request.urlopen("https://www.sdstate.edu/electrical-engineering-and-computer-science";)
as cs:
cs_page = cs.read()
soup = BeautifulSoup(cs_page, "html.parser")
print(len(soup.body.find_all(string = ["Engineering","engineering"])))
i used control +
Sudo apt install Python 3.6 should be enough. But I would advise to use a
virtual environment since you don't want to mess up Ubuntu configuration.
Sent from my Verizon LG Smartphone
-- Original message--
From: Joseph VOGTEMBING via Tutor
Date: Sun, Jul 2, 2017 2:48 PM
To: tutor@python.o
Hi Shannon,
Yes there is a way. First in my opinion I think queue.json is not really a JSON
data structure but just a list of list. If you are able to read it then I
that’s great.
One way to solve this is doing something like below:
queue = [
["James Bruce", "Bananas"],
["Kathe
15 matches
Mail list logo