i trying run react native project on ubuntu 16.04 . the $path correct according documentation. when echo $path , following shown : /home/yash/bin:/home/yash/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/yash/.config/composer/vendor/bin:/home/yash/.config/composer/vendor/bin:/root/android/sdk/tools:/root/android/sdk/platform-tools the error shown when running react-native run-android : * went wrong: problem occurred configuring project ':app'. > sdk directory '/root/android/sdk' not exist. the /root directory has special permissions prevent react-native accessing it. should put android sdk in directory readable user (e.g. , /home/yash/android ).
what options clone or copy list in python? using new_list = my_list modifies new_list every time my_list changes. why this? with new_list = my_list , don't have 2 lists. assignment copies reference list, not actual list, both new_list , my_list refer same list after assignment. to copy list, have various possibilities: you can slice it: new_list = old_list[:] alex martelli's opinion (at least back in 2007 ) is, it weird syntax , not make sense use ever . ;) (in opinion, next 1 more readable). you can use built in list() function: new_list = list(old_list) you can use generic copy.copy() : import copy new_list = copy.copy(old_list) this little slower list() because has find out datatype of old_list first. if list contains objects , want copy them well, use generic copy.deepcopy() : import copy new_list = copy.deepcopy(old_list) obviously slowest , memory-needing method, unavoidable. example: import copy class foo(object): ...
Comments
Post a Comment