I have been learning python for a few days now and needed something to put my mind into, I was searching for a way to create a map using turtle and came across this code on my computer I created a file.txt with the following coordinates:
river, 5
-400, 400
-333, 400
300, 500
sand, 5
555, -200
600, 554
334, 432
4332, 43 - import csv
-
block=[]
-
f=open("file.txt", "r")
-
csv_reader=csv.reader(f)
-
for row in csv_reader:
-
block.append(tuple(row))
This function does not work can someone help me conquer this
2 2403
What are you trying to accomplish with variable block?
I don't know what
This function does not work
means. It prints fine for me. - test_data="""river, 5
-
-400, 400
-
-333, 400
-
300, 500
-
-
sand, 5
-
555, -200
-
600, 554
-
334, 432
-
4332, 43"""
-
with open("./test.txt", "w") as fp_out:
-
fp_out.write(test_data)
-
-
import csv
-
block=[]
-
f=open("./test.txt", "r")
-
csv_reader=csv.reader(f)
-
print "\nInput file is"
-
for row in csv_reader:
-
print row
-
f.close()
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Andre |
last post by:
Hi,
In 'test.htm', there are two Select, one visible, the other invisible. The
second becomes visible only if the number of records in a Access table <2.
There is also a button to start the...
|
by: Alex |
last post by:
Hi, I have a problem involving some design issue.
I have two unrelated (that is, they do not derive from the same base)
classes:
ClassA
ClassB
Both have a quite similar interface, so they can...
|
by: Jet Leung |
last post by:
When I debug my program and it return me an error call " have not handle
¡°System.StackOverflowException¡± appear in system.windows.forms.dll "
How can I solve this problem??
|
by: Shapper |
last post by:
Hello,
I have an ASP:ImageButton where I want to call a function and pass a
string:
OnClick="Change_Photo("John")"
I am having problems with "".
I tried
|
by: Mat |
last post by:
I am developping multi-user windows application. i use Access database.
user edit, add and delete data from database.
Request:
when an item is deleted ,added or modified by an user, all others...
|
by: Nobody |
last post by:
Anyone have a clean way of solving this define issue?
In Windows, there are sometimes unicode functions and multibyte functions...
the naming convention used is FunctionA for multibyte and...
|
by: jautrus |
last post by:
I would like to have div tag over list box, not list box over div tag.
I have this problem on many pages usually when I use drop down menus.
I try to solve this problem with z-index but it doesn't...
|
by: itsvineeth209 |
last post by:
My task is to create login control without using login control in tools. I shouldnt use sqldatasource or any other. I should use only data sets, data adapters and data readers etc.
U had created...
|
by: akmaRudiliyn |
last post by:
Hai everybody :). I have problem and need help.
ERROR:
ERROR Violation of PRIMARY KEY constraint 'PK_Table1_01'. Cannot insert duplicate key in object 'dbo.table1'.
ERROR The statement has...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
| |