๐Ÿ“ข Too many exams? Donโ€™t know which one suits you best? Book Your Free Expert ๐Ÿ‘‰ call Now!

  • google app store apple app store
  • โœ–

      Question

      What is the output for the below code MyList =

      ["New York", "London", "Paris", "New Delhi"] MyFile=open('output.txt','w') ย  for element in MyList: ย ย ย  print >>MyFile, element MyFile.close()
      A New York Paris New Delhi London Correct Answer Incorrect Answer
      B London Paris New Delhi New York Correct Answer Incorrect Answer
      C New York London Paris New Delhi Correct Answer Incorrect Answer
      D None of these Correct Answer Incorrect Answer
      E All of these Correct Answer Incorrect Answer

      Solution

      The correct answer is C

      Practice Next
      ask-question