randrange() returns an integer. hp = randrange(3,10) assigns the name hp to this return value. The repetition of this name in the program does not change this integer and does not force hp to refer to any other number.
Similarly, choice(ee_names) returns a string. ename = choice(ee_names) assigns the name ename to this string. Repetition of this name in the program does not change this line and does not force the ename to refer to any other string.
That is, all elements in the list_ list are equal to each other and therefore choice(list_) always returns equivalent values in this case.
hp does not change inside the loop, so all iterations show the same value.
Moreover, integers and strings are immutable in Python, the only way to "change" hp is to assign a new value (usually = sign is used to make the name point to a new object, but it is not the only way, for example, import associates various objects from other models with the names in the current module).
I recommend to the pictures next to the heading "In Python there are" names "" from "Code Like a Pythonista: Idiomatic Python" by David Goodger and look at the presentation of Ned Batchelder from Pycon 2015, where this question is described in more detail (code and pictures on slides) to understand the relationship between names and their meanings in Python.
Even if the hp name would refer to a function that generates a new value, then there are not enough parentheses () to call it. In some languages, the use of brackets may be optional, but in Python brackets are required:
#!/usr/bin/env python # -*- coding: utf-8 -*- import time import random from functools import partial ee_names = [ u'Злая крыса', u'Не очень-то злой филин', u'Чуть озверевший голубь', u'Простуженная улитка' ] generate_name = partial(random.choice, ee_names) generate_hp = partial(random.randrange, 3, 10) for _ in range(5): print(u"[{name}]\n\tHP: {hp}".format(name=generate_name(), hp=generate_hp())) time.sleep(1)
partial() simply remembers the arguments given to it and uses them on subsequent calls.
Here it is better to insert the implementation of functions directly in place, as shown in the answer @idle sign .