[Tutor] List of tuples

2016-04-19 Thread isaac tetteh
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

Re: [Tutor] List of tuples

2016-04-20 Thread isaac tetteh
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 >

[Tutor] Fwd: List of tuples

2016-04-20 Thread isaac tetteh
> 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,

Re: [Tutor] Is there a library which has this object?

2016-04-29 Thread isaac tetteh
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

Re: [Tutor] Sorting a list in ascending order

2016-04-29 Thread isaac tetteh
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.

Re: [Tutor] Issues converting a script to a functioin (or something) [SOLVED]

2016-05-01 Thread isaac tetteh
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

Re: [Tutor] Dictionary Question

2016-05-02 Thread isaac tetteh
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

Re: [Tutor] Dictionary Question

2016-05-02 Thread isaac tetteh
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

Re: [Tutor] Dictionary Question

2016-05-02 Thread isaac tetteh
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

[Tutor] Fwd: Fwd: Re: need help

2016-08-12 Thread isaac tetteh
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

Re: [Tutor] Need reference materials to learn flask + python for payroll project that would run both in windows (PC) and android/iOS.

2016-09-13 Thread isaac tetteh
"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

Re: [Tutor] Adding numbers within a string

2016-10-12 Thread isaac tetteh
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

Re: [Tutor] (regular expression)

2016-12-10 Thread isaac tetteh
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 +

Re: [Tutor] Installing Python3.6.1 on Ubuntu 16.04.2

2017-07-02 Thread isaac tetteh
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

Re: [Tutor] Help with loops

2018-05-01 Thread Isaac Tetteh
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