What will be the output of the following Python code?Questions & Answers › Category: Python › What will be the output of the following Python code? 0 Vote Up Vote Down Lokesh Kumar Staff asked 2 years ago What will be the output of the following Python code?>>>str="hello" >>>str[:2] >>> a. he b. lo c. olleh d. helloShare this:Click to share on Facebook (Opens in new window)Click to share on Twitter (Opens in new window)Click to share on WhatsApp (Opens in new window)Click to print (Opens in new window)Click to share on LinkedIn (Opens in new window)Click to share on Pinterest (Opens in new window)Like this:Like Loading...1 Answers 0 Vote Up Vote Down Lokesh Kumar Staff answered 2 years ago a. heExplanation: We are printing only the 1st two bytes of string and hence the answer is “he”.Share this:Click to share on Facebook (Opens in new window)Click to share on Twitter (Opens in new window)Click to share on WhatsApp (Opens in new window)Click to print (Opens in new window)Click to share on LinkedIn (Opens in new window)Click to share on Pinterest (Opens in new window)Like this:Like Loading...