Home python How to convert an array in a python line?

How to convert an array in a python line?




Here is a parser

import requests
Import DateParser.
From BS4 Import Beautifulsoup
Import mysql.connector
  R = Requests.get (URL)
  Return R.Text
DEF Get_Data (HTML):
  Soup = Beautifulsoup (HTML, 'LXML')
  title = Soup.find ('H1'). Text
  Date = Soup.find ('Span', {'Class': 'NEWS_DATE'}). Text
  Text = Soup.find ('p'). Text
  Textp = Soup.find_all ('P')
  dateparser.parse ('30 July 2019, 13:48 ', Date_formats = ['% d% B% y% h '])
  Print (Title)
  PRINT (text)
  Print (Textp)
DEF Main ():
  url = 'https://www.zakon.kz/4979616-kazahstan-spustya-12-let-vyigral-zoloto.html'
  (Get_Data (Get_HTML (URL)))
if __name__ == '__main__':
Main ()

and when it is out of the parser of these rows, these data are an array. How do I convert them to a string?

textp = soup.find_all ('p')
Print (Textp)

Answer 1, Authority 100%

a = ['a', 'b', 'c']
STR_A = '' .JOIN (A) # 'ABC'

Answer 2, Authority 25%

Found Answer: When Print used the Join Print method

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions