You want to store a list of a user's recent activity in chronological order. What Redis data type is suitable?
Hash
List
String
Set
What happens if you try to rename a key to a name that already exists in Redis?
Redis creates a new key with a unique name.
The command is ignored.
The existing key is overwritten with the value of the renamed key.
An error is returned, and the original key remains unchanged.
How do you retrieve the value associated with the key 'mykey' in redis-py?
r.fetch('mykey')
r.read('mykey')
r.get('mykey')
r.retrieve('mykey')
Which Python package is commonly used to interact with a Redis database?
redis-py
redisdb
python-redis
pyredis
Which command is used to remove the expiration time from a key, making it persistent?
PERSIST
UNEXPIRE
DELETE
REMOVE
What is the correct way to set a key-value pair named 'mykey' with the value 'myvalue' using redis-py?
r.assign('mykey', 'myvalue')
r.set('mykey', 'myvalue')
r.insert('mykey', 'myvalue')
r.put('mykey', 'myvalue')
What type of data structures does Redis support?
Strings, lists, sets, and hashes
Exclusively JSON documents
Only key-value pairs
Only strings
What is the default port on which the Redis server listens for connections?
6379
27017
80
3306
What is the purpose of the 'RPUSH' command in Redis?
Remove an element from the tail of a list
Add an element to the tail of a list
Add an element to the head of a list
Remove an element from the head of a list
Which configuration file is commonly used to modify Redis server settings?
redis.ini
redis.conf
settings.redis
config.redis