Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Complete the code to append the values in my _ list to a file named my _ data.txt with one value in each line. m

Complete the code to append the values in my_list to a file named my_data.txt with one value in each line.
mylist =[10,20,30,50]
xxxxxxx
a.
file = open('my_data.txt','a+')
for i in my_list:
file.write(i)
b. file = open('my_data.txt','w')
for i in my_list:
file.write(str(i)+'??
?'
c.
file = open('my_data.txt','a+')
for i in my list:
file.write(str(i)+'}
('
d.)
for i in my_list:
file.write(i)
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Management Databases And Organizations

Authors: Richard T. Watson

3rd Edition

0471418455, 978-0471418450

More Books

Students also viewed these Databases questions

Question

What are Decision Trees?

Answered: 1 week ago

Question

What is meant by the Term Glass Ceiling?

Answered: 1 week ago