Artificial reviews
While checking out the movie reviews in your dataset, you realize that some of them show an atypical pattern. Since you should only include true reviews in your analysis, you decide to extract the suspicious ones that follow this pattern. You want to see if it is possible to artificially create reviews by using the first and last part of one example review and changing a keyword in the middle.
The text of two movie reviews has been already saved in the variables movie1
and movie2
. You can use the print()
function to view the variables in the IPython Shell.
Remember: The 1st character of a string has index 0.
Diese Übung ist Teil des Kurses
Regular Expressions in Python
Interaktive Übung
Versuche dich an dieser Übung, indem du diesen Beispielcode vervollständigst.
# Select the first 32 characters of movie1
first_part = ____[____]