You could also use a list comprehension to skip the step of appending to the created list and just create the list.
Code:
A=[(4+random.random()) for i in range(8)]
List comprehensions were one of the best things I've learned about. I had one block of about 12 overly complicated lines in an early project get replaced by one list comprehension....and that simplification flowed through everything else.